home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / AMOS / AMOSList0597 / AMOSLIST / text0035.txt < prev    next >
Encoding:
Text File  |  1997-06-01  |  1.8 KB  |  67 lines

  1. Greetings to the one known as Hakan, who also is allegidley babbled this on
  2. 08-May-97 :
  3. > >>>amos-list@access.digex.net
  4.  
  5. > I would like to see some suggestions how to highlight a word printed on
  6. screen
  7. > when the mouse pointer is over it. 
  8. > Say i've printed
  9.  
  10. > Pen 1
  11. > locate 1,1 : Print"AAA"
  12. > locate 1,2 : Print"BBB"
  13.  
  14.  
  15. > Now I want the text to be rewritten with Pen 2
  16. > only when the pointer is over it.
  17.  
  18. > I did find some ways to do it but the text always flickers...
  19.  
  20. > I guess there is some way to get a steady highlight... 
  21.  
  22. There are a few ways that you can do it. You could use the MOUSE ZONE command
  23. (which would mean having to set zones for each word) and have a routine like:
  24.  
  25. top:
  26. Locate 1,1 : ink 1 : print "highlight"
  27.  
  28. repeat
  29. if mouse zone=1
  30. locate 1,1: ink 2 : print "highlight"
  31. endif
  32.  
  33. if mouse zone=2
  34. locate 1,2 : ink 2 : print "another highlight"
  35. endif
  36.  
  37. if mouse zone=0
  38. goto top
  39. endif
  40. until false
  41.  
  42.  
  43. This means, that the routine will only refresh itself, if no parts are
  44. selected. If you dont do a CLS command in the start of the text, you will then
  45. not get any flicker, as you are not adding anything new, or removing anything,
  46. just making the existing text a different colour.
  47.  
  48. Mush
  49.  
  50.                --------******( Extreme AMOS )******--------
  51.  
  52.            AMOS Raycater completion [####----------------] - 20%
  53.  
  54.     The best AMOS homepages around, full of downloads, and my AMOS disk
  55.  magazine. Order games and utilities  directly from the library, for FREE.
  56.  
  57.           See my homepages at http://www.mushy-pd.demon.co.uk or
  58.        http://members.tripod.com/~mushypd for more information, and
  59.                         info on my raycaster game!!
  60.  
  61.                         Email: mushypd@redrose.net
  62.  
  63.                  Look for Andy Kellett on VDOphone online!
  64.                       ICQ No. - 778243 (talk to me!!)
  65.  
  66.  
  67.